package com.ssm.controller;

import com.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @ClassName: UserController.java
 * @author: FULITAO
 * @description:
 * @createTime: 2021年07月07日 09:20:00
 */
@RequestMapping(value = "/user")
@Controller
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping(method = RequestMethod.GET)
    public String testUser(Model model) {
        model.addAttribute("user", userService.findUserById(1).toString());
        return "user";

    }

}
